<?php
$origin = isset($_SERVER['HTTP_ORIGIN'])? $_SERVER['HTTP_ORIGIN'] : '';  
$allow_origin = array(
    'http://local.hongyanche.com',  
    'http://www.hongyanche.com',
    'http://hongyanche.com',
    'http://hy.tiesh.com'
);  
if(in_array($origin, $allow_origin)){  
    header('Access-Control-Allow-Origin:'.$origin);   
    //允许跨域ajax带session_id;
    header('Access-Control-Allow-Credentials: true');    
}
return [
    'session'                => [
        'id'             => '',
        // SESSION_ID的提交变量,解决flash上传跨域
        'var_session_id' => '',
        // SESSION 前缀
        'prefix'         => 'hyc',
        // 驱动方式 支持redis memcache memcached
        'type'           => '',
        // 是否自动开启 SESSION
        'auto_start'     => true,
        'domain'         => ".hongyanche.com",
    ],
    'config_module'      => 'hongyanche',
];